Skip to content

Fix a few compile errors due to config#105

Merged
bigbrett merged 3 commits intowolfSSL:mainfrom
billphipps:client_crypto_fixups
Apr 27, 2025
Merged

Fix a few compile errors due to config#105
bigbrett merged 3 commits intowolfSSL:mainfrom
billphipps:client_crypto_fixups

Conversation

@billphipps
Copy link
Contributor

@billphipps billphipps commented Apr 26, 2025

When building wolfHSM-examples, a couple of config errors were found:

  1. _create_crypto_request_with_subtype was never called when pqc in not enabled. Fixed by routing _crete_crypto_request through this function
  2. sha256->flags only exists when WOLFSSL_HASH_FLAGS is set, which is not required. Fix conditionally handles this.
  3. only provide key export data on non-error.

@billphipps billphipps requested review from bigbrett and Copilot April 26, 2025 16:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes compile errors in wolfHSM-examples related to crypto request creation and SHA256 configuration.

  • Updated the crypto request initialization to use _createCryptoRequestWithSubtype.
  • Guarded the SHA256 flags initialization with a conditional compile check for WOLFSSL_HASH_FLAGS.

@billphipps billphipps requested a review from Copilot April 26, 2025 17:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a few compile errors related to configuration in the wolfHSM-examples project.

  • In the keystore server code, key output data is now only provided on non-error responses, and the overall response size calculation has been corrected.
  • In the crypto client code, the generic crypto request header is now routed through _createCryptoRequestWithSubtype, and SHA256 flags are only set when WOLFSSL_HASH_FLAGS is defined.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/wh_server_keystore.c Adjusts key output based on response code and updates the overall output size.
src/wh_client_crypto.c Routes crypto request creation via _createCryptoRequestWithSubtype and fixes SHA256 flag handling.

@billphipps billphipps self-assigned this Apr 26, 2025
@bigbrett bigbrett merged commit ea4c3db into wolfSSL:main Apr 27, 2025
2 checks passed
@billphipps billphipps deleted the client_crypto_fixups branch August 12, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants